<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
window.onload= function()
{
	//var oTxt = document.getElementById('txt1');
	var oBtn = document.getElementById('btn1');
	
	oBtn.onclick=function()
	{
		alert('width: ' + document.documentElement.clientWidth + ' height: '+ document.documentElement.clientHeight);
	};
};
</script>
</head>

<body>
<input type="button" value="可视区" id="btn1">
</body>
</html>
